package cz.cuni.mff.ufal.volk.boot;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

public class BootCodeLoaderMock implements BootCodeLoader {
  @Override
  public BootCode loadBootCode(String version, String serial) {
    return new BootCodeMock();
  }
  
  private static class BootCodeMock implements BootCode {
    
    final byte[] bootCode = new byte[] { 'B', 'a', 'r', 't', 'e', 'k' };

    @Override
    public InputStream getInputStream() {
      int offset = 0, length = bootCode.length;
      return new ByteArrayInputStream(bootCode, offset, length);
    }

    @Override
    public long size() {
      return bootCode.length;
    }
    
  }
}
